import lejos.nxt.Motor;


public class main {

	public static void pause(int time)
	{
		try
		{
			Thread.sleep(time);
		}
		catch(InterruptedException e)
		{
			
		}
	}
	
	static void turnLeft(int time) 
	{
		  Motor.A.stop(); 
		  Motor.C.forward();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 
	
	static void turnRight(int time) 
	{
		  Motor.A.forward(); 
		  Motor.C.stop();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 

	static void goBackward(int time) 
	{
		  Motor.A.forward(); 
		  Motor.C.forward();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 
	
	static void goForward(int time) 
	{
		  Motor.A.backward(); 
		  Motor.C.backward();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 
	
	static void spinLeft(int time) 
	{
		  Motor.A.backward(); 
		  Motor.C.forward();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 

	static void spinRight(int time) 
	{
		  Motor.A.forward(); 
		  Motor.C.backward();
		  try { 
		    Thread.sleep(time);
		  } 
		  catch (Exception e) { 
		  }
		  Motor.A.stop(); 
		  Motor.C.stop();
	} 
	
	
	public static void main(String[] args) {
		System.out.println(" ThunderCracker  \n Bitches !!! \n------------");
	
		System.out.println("\ngoForward");
		goForward(3000);
		pause(1000);
		
		System.out.println("\ngoBackward");
		goBackward(3000);
		pause(1000);
		
		System.out.println("\ngospinLeft");
		spinLeft(3000);
		pause(1000);
		
		System.out.println("\ngospinRight");
		spinRight(3000);
		pause(1000);
		
		
		System.out.println("\nPress [Enter]");
		lejos.nxt.Button.ENTER.waitForAnyPress();		
	}

}
